package EDesign23;

public class IAbstractFactory {

    public interface Chair {
        void getChairIntroduction();
    }

    public interface Desk {
        void getDeskIntroduction();
    }

    public class ModernStyleChair implements Chair {
        @Override
        public void getChairIntroduction() {
            System.out.println("这是一个现代简约风格的椅子");
        }
    }

    public class EuropeanStyleChair implements Chair {
        @Override
        public void getChairIntroduction() {
            System.out.println("这是一个欧式风格的椅子");
        }
    }

    public interface FurnitureFactory {
        Chair createChair();
//        Desk createDesk();
    }

    public class ModernFurnitureFactory implements FurnitureFactory{
        @Override
        public Chair createChair() {
            return new ModernStyleChair();
        }

//        @Override
//        public Desk createDesk() {
//            return new ModernStyleDesk();
//        }
    }


//    public class Client {
//        public static void main(String[] args) {
//            FurnitureFactory furnitureFactory = new EuropeanFurnitureFactory();
//            Chair chair = furnitureFactory.createChair();
//            Desk desk = furnitureFactory.createDesk();
//
//            chair.getChairIntroduction();
//            desk.getDeskIntroduction();
//        }
//    }

}
